<?php
session_start();
$uid=$_SESSION['id'];
if(!$uid)
	exit;
function __autoload($name){
	include '../class/'.strtolower($name).'.class.php';
}
$user=new User;
$headPic=$user->picPath.$user->getHeadPic($uid);
if(file_exists($headPic))
	$headPic='<img src="'.$headPic.'" width="200px">';
else
	$headPic='您还没有上传头像、赶紧上传吧';

?>
<div >
<table>
	<tr>
		<td>头像：</td>
		<td><?php echo $headPic ?></td>
		<td><a href="javascript:changeHeadpic()">修改头像</a></td>
	</tr>	
	<tr>
		<td>昵称：</td>
		<td><?php echo $_SESSION['nick_name'] ?></td>
		<td><a href="javascript:changeNick()">修改昵称</a></td>
	</tr>
	<tr>
		<td style="vertical-align:middle">密码:</td>
		<td>
			<input type="text" placeholder="原始密码"><br>
			<input type="text" placeholder="新密码"><br>
			<input type="text" placeholder="确认密码">
		</td>
		<td style="vertical-align:bottom">
			<button onclick="change_password()" class="btn btn-primary">确认修改</button>
		</td>
	</tr>
		<td>我的文章</td>
		<td colspan="2">
			<input type="button" onclick="reviseArticles()" value="修改我的文章" class="btn btn-primary" style="width:100%">
		</td>
	</tr>
</table>
</div>
